<?
class My_xmlrpc_blogger {
	/**
	 *@param string $appkey
	 *@param string $username
	 *@param string $password
	 *@return array
	 */
	public function getUsersBlogs($p0, $username, $password) {
		$a ['isAdmin'] = 'true';
		$a ['url'] = 'http://www.zy2f.com/';
		$a ['blogid'] = '1';
		$a ['blogName'] = 'tjutcm';
		$login = new My_Login ( );
		if (! $login->login ( $username, $password ))
			throw new Zend_XmlRpc_Server_Exception ( '403', 403 );
		return array ($a );
	}
	public function getUserInfo() {
		;
	}
	public function newPost() {
		;
	}
	/**
	 *@param string $appkey
	 *@param string $postid
	 *@param string $username
	 *@param string $password
	 *@param string $password
	 */
	public function getTemplate($appkey, $blogid, $username, $password, $templateType) {
		$filename = '1.txt';
		
		$f = fopen ( $filename, 'r' );
		$content = fread ( $f, filesize ( $filename ) );
		fclose ( $f );
		return $content;
	}
	/**
	 *@param string $appkey
	 *@param string $postid
	 *@param string $username
	 *@param string $password
	 *@param boolean $publish
	 *@return array
	 */
	public function deletePost($appkey, $postid, $username, $password, $publish) {
		$login = new My_Login ( );
		if (! $login->login ( $username, $password ))
			throw new Zend_XmlRpc_Server_Exception ( '403', 403 );
		
		$blog = new Article ( );
		return $blog->find ( $postid )->current ()->delete ();
	}
}

?>